/**
 * 管理图数据库示例数据
 * 专门为图数据库管理界面设计的3D网络数据
 */

/**
 * 图数据库管理相关的示例数据
 */
export const managementGraphData = {
  settings: {
    epoch: 'time',
    epochFormat: 'YYYY-MM-DD HH:mm:ss',
    source: 'source',
    target: 'target'
  },
  
  // 图数据库管理节点
  nodes: {
    // 数据库核心组件
    'Neo4j数据库': { type: 'database', group: 1, category: '核心数据库' },
    'Cypher查询引擎': { type: 'query_engine', group: 1, category: '查询引擎' },
    '图存储引擎': { type: 'storage', group: 1, category: '存储引擎' },
    '事务管理器': { type: 'transaction', group: 1, category: '事务管理' },
    '索引管理器': { type: 'index', group: 1, category: '索引管理' },
    
    // 管理工具
    'Neo4j Browser': { type: 'tool', group: 2, category: '管理工具' },
    'Neo4j Desktop': { type: 'tool', group: 2, category: '管理工具' },
    'APOC插件': { type: 'plugin', group: 2, category: '插件扩展' },
    'Graph Data Science': { type: 'plugin', group: 2, category: '插件扩展' },
    'Bloom可视化': { type: 'visualization', group: 2, category: '可视化工具' },
    
    // 监控组件
    '性能监控': { type: 'monitor', group: 3, category: '系统监控' },
    '内存监控': { type: 'monitor', group: 3, category: '资源监控' },
    'CPU监控': { type: 'monitor', group: 3, category: '资源监控' },
    '磁盘监控': { type: 'monitor', group: 3, category: '资源监控' },
    '网络监控': { type: 'monitor', group: 3, category: '网络监控' },
    '连接池监控': { type: 'monitor', group: 3, category: '连接监控' },
    
    // 安全组件
    '用户认证': { type: 'security', group: 4, category: '安全管理' },
    '角色管理': { type: 'security', group: 4, category: '权限管理' },
    '访问控制': { type: 'security', group: 4, category: '访问控制' },
    '审计日志': { type: 'security', group: 4, category: '审计管理' },
    '数据加密': { type: 'security', group: 4, category: '数据安全' },
    
    // 备份恢复
    '数据备份': { type: 'backup', group: 5, category: '备份管理' },
    '增量备份': { type: 'backup', group: 5, category: '备份策略' },
    '全量备份': { type: 'backup', group: 5, category: '备份策略' },
    '数据恢复': { type: 'recovery', group: 5, category: '恢复管理' },
    '灾难恢复': { type: 'recovery', group: 5, category: '灾难恢复' },
    
    // 集群管理
    '主节点': { type: 'cluster', group: 6, category: '集群管理' },
    '从节点1': { type: 'cluster', group: 6, category: '集群节点' },
    '从节点2': { type: 'cluster', group: 6, category: '集群节点' },
    '负载均衡器': { type: 'cluster', group: 6, category: '负载均衡' },
    '集群协调器': { type: 'cluster', group: 6, category: '集群协调' },
    
    // 数据导入导出
    '数据导入工具': { type: 'import_export', group: 7, category: '数据迁移' },
    '数据导出工具': { type: 'import_export', group: 7, category: '数据迁移' },
    'CSV导入器': { type: 'import_export', group: 7, category: '格式转换' },
    'JSON导出器': { type: 'import_export', group: 7, category: '格式转换' },
    '数据转换器': { type: 'import_export', group: 7, category: '数据处理' },
    
    // 应用连接
    'Java驱动': { type: 'driver', group: 8, category: '应用驱动' },
    'Python驱动': { type: 'driver', group: 8, category: '应用驱动' },
    'JavaScript驱动': { type: 'driver', group: 8, category: '应用驱动' },
    'REST API': { type: 'api', group: 8, category: 'API接口' },
    'GraphQL接口': { type: 'api', group: 8, category: 'API接口' },
    
    // 分析工具
    '图算法库': { type: 'analytics', group: 9, category: '图分析' },
    '路径分析': { type: 'analytics', group: 9, category: '路径分析' },
    '社区发现': { type: 'analytics', group: 9, category: '社区分析' },
    '中心性分析': { type: 'analytics', group: 9, category: '中心性分析' },
    '相似性分析': { type: 'analytics', group: 9, category: '相似性分析' }
  },
  
  // 图数据库管理边关系
  edges: {
    'core_components': {
      data: [
        { source: 'Neo4j数据库', target: 'Cypher查询引擎', type: 'contains', weight: 3, time: '2024-01-01 08:00:00' },
        { source: 'Neo4j数据库', target: '图存储引擎', type: 'contains', weight: 3, time: '2024-01-01 08:00:00' },
        { source: 'Neo4j数据库', target: '事务管理器', type: 'contains', weight: 3, time: '2024-01-01 08:00:00' },
        { source: 'Neo4j数据库', target: '索引管理器', type: 'contains', weight: 3, time: '2024-01-01 08:00:00' },
        { source: 'Cypher查询引擎', target: '图存储引擎', type: 'queries', weight: 3, time: '2024-01-01 08:15:00' },
        { source: 'Cypher查询引擎', target: '事务管理器', type: 'uses', weight: 2, time: '2024-01-01 08:30:00' },
        { source: '图存储引擎', target: '索引管理器', type: 'indexes', weight: 2, time: '2024-01-01 08:45:00' },
        { source: '事务管理器', target: '图存储引擎', type: 'manages', weight: 3, time: '2024-01-01 09:00:00' }
      ]
    },
    
    'management_tools': {
      data: [
        { source: 'Neo4j Browser', target: 'Cypher查询引擎', type: 'executes', weight: 3, time: '2024-01-01 09:15:00' },
        { source: 'Neo4j Desktop', target: 'Neo4j数据库', type: 'manages', weight: 3, time: '2024-01-01 09:30:00' },
        { source: 'APOC插件', target: 'Cypher查询引擎', type: 'extends', weight: 2, time: '2024-01-01 09:45:00' },
        { source: 'Graph Data Science', target: 'Neo4j数据库', type: 'analyzes', weight: 3, time: '2024-01-01 10:00:00' },
        { source: 'Bloom可视化', target: 'Neo4j数据库', type: 'visualizes', weight: 2, time: '2024-01-01 10:15:00' },
        { source: 'Neo4j Desktop', target: 'APOC插件', type: 'installs', weight: 1, time: '2024-01-01 10:30:00' },
        { source: 'Neo4j Desktop', target: 'Graph Data Science', type: 'installs', weight: 1, time: '2024-01-01 10:45:00' }
      ]
    },
    
    'monitoring_system': {
      data: [
        { source: '性能监控', target: 'Neo4j数据库', type: 'monitors', weight: 3, time: '2024-01-01 11:00:00' },
        { source: '内存监控', target: '图存储引擎', type: 'tracks', weight: 2, time: '2024-01-01 11:15:00' },
        { source: 'CPU监控', target: 'Cypher查询引擎', type: 'measures', weight: 2, time: '2024-01-01 11:30:00' },
        { source: '磁盘监控', target: '图存储引擎', type: 'watches', weight: 2, time: '2024-01-01 11:45:00' },
        { source: '网络监控', target: '负载均衡器', type: 'observes', weight: 2, time: '2024-01-01 12:00:00' },
        { source: '连接池监控', target: 'Neo4j数据库', type: 'tracks', weight: 2, time: '2024-01-01 12:15:00' },
        { source: '性能监控', target: '内存监控', type: 'includes', weight: 1, time: '2024-01-01 12:30:00' },
        { source: '性能监控', target: 'CPU监控', type: 'includes', weight: 1, time: '2024-01-01 12:45:00' }
      ]
    },
    
    'security_management': {
      data: [
        { source: '用户认证', target: 'Neo4j数据库', type: 'protects', weight: 3, time: '2024-01-01 13:00:00' },
        { source: '角色管理', target: '用户认证', type: 'defines', weight: 2, time: '2024-01-01 13:15:00' },
        { source: '访问控制', target: '角色管理', type: 'enforces', weight: 2, time: '2024-01-01 13:30:00' },
        { source: '审计日志', target: '访问控制', type: 'records', weight: 2, time: '2024-01-01 13:45:00' },
        { source: '数据加密', target: '图存储引擎', type: 'secures', weight: 3, time: '2024-01-01 14:00:00' },
        { source: '审计日志', target: 'Cypher查询引擎', type: 'logs', weight: 2, time: '2024-01-01 14:15:00' },
        { source: '访问控制', target: 'Neo4j Browser', type: 'restricts', weight: 1, time: '2024-01-01 14:30:00' }
      ]
    },
    
    'backup_recovery': {
      data: [
        { source: '数据备份', target: '图存储引擎', type: 'backs_up', weight: 3, time: '2024-01-01 15:00:00' },
        { source: '增量备份', target: '数据备份', type: 'implements', weight: 2, time: '2024-01-01 15:15:00' },
        { source: '全量备份', target: '数据备份', type: 'implements', weight: 2, time: '2024-01-01 15:30:00' },
        { source: '数据恢复', target: '数据备份', type: 'restores_from', weight: 3, time: '2024-01-01 15:45:00' },
        { source: '灾难恢复', target: '数据恢复', type: 'extends', weight: 2, time: '2024-01-01 16:00:00' },
        { source: '灾难恢复', target: '集群协调器', type: 'coordinates', weight: 2, time: '2024-01-01 16:15:00' }
      ]
    },
    
    'cluster_management': {
      data: [
        { source: '主节点', target: 'Neo4j数据库', type: 'hosts', weight: 3, time: '2024-01-01 16:30:00' },
        { source: '从节点1', target: '主节点', type: 'replicates', weight: 3, time: '2024-01-01 16:45:00' },
        { source: '从节点2', target: '主节点', type: 'replicates', weight: 3, time: '2024-01-01 17:00:00' },
        { source: '负载均衡器', target: '主节点', type: 'distributes_to', weight: 2, time: '2024-01-01 17:15:00' },
        { source: '负载均衡器', target: '从节点1', type: 'distributes_to', weight: 2, time: '2024-01-01 17:30:00' },
        { source: '负载均衡器', target: '从节点2', type: 'distributes_to', weight: 2, time: '2024-01-01 17:45:00' },
        { source: '集群协调器', target: '主节点', type: 'coordinates', weight: 2, time: '2024-01-01 18:00:00' },
        { source: '集群协调器', target: '从节点1', type: 'manages', weight: 2, time: '2024-01-01 18:15:00' },
        { source: '集群协调器', target: '从节点2', type: 'manages', weight: 2, time: '2024-01-01 18:30:00' }
      ]
    },
    
    'data_migration': {
      data: [
        { source: '数据导入工具', target: '图存储引擎', type: 'imports_to', weight: 3, time: '2024-01-01 19:00:00' },
        { source: '数据导出工具', target: '图存储引擎', type: 'exports_from', weight: 3, time: '2024-01-01 19:15:00' },
        { source: 'CSV导入器', target: '数据导入工具', type: 'supports', weight: 2, time: '2024-01-01 19:30:00' },
        { source: 'JSON导出器', target: '数据导出工具', type: 'supports', weight: 2, time: '2024-01-01 19:45:00' },
        { source: '数据转换器', target: '数据导入工具', type: 'preprocesses', weight: 2, time: '2024-01-01 20:00:00' },
        { source: '数据转换器', target: '数据导出工具', type: 'postprocesses', weight: 2, time: '2024-01-01 20:15:00' }
      ]
    },
    
    'application_drivers': {
      data: [
        { source: 'Java驱动', target: 'Neo4j数据库', type: 'connects_to', weight: 2, time: '2024-01-01 20:30:00' },
        { source: 'Python驱动', target: 'Neo4j数据库', type: 'connects_to', weight: 2, time: '2024-01-01 20:45:00' },
        { source: 'JavaScript驱动', target: 'Neo4j数据库', type: 'connects_to', weight: 2, time: '2024-01-01 21:00:00' },
        { source: 'REST API', target: 'Cypher查询引擎', type: 'exposes', weight: 2, time: '2024-01-01 21:15:00' },
        { source: 'GraphQL接口', target: 'Cypher查询引擎', type: 'wraps', weight: 2, time: '2024-01-01 21:30:00' },
        { source: '负载均衡器', target: 'REST API', type: 'routes_to', weight: 1, time: '2024-01-01 21:45:00' }
      ]
    },
    
    'analytics_tools': {
      data: [
        { source: '图算法库', target: 'Graph Data Science', type: 'implements', weight: 3, time: '2024-01-01 22:00:00' },
        { source: '路径分析', target: '图算法库', type: 'uses', weight: 2, time: '2024-01-01 22:15:00' },
        { source: '社区发现', target: '图算法库', type: 'uses', weight: 2, time: '2024-01-01 22:30:00' },
        { source: '中心性分析', target: '图算法库', type: 'uses', weight: 2, time: '2024-01-01 22:45:00' },
        { source: '相似性分析', target: '图算法库', type: 'uses', weight: 2, time: '2024-01-01 23:00:00' },
        { source: 'Bloom可视化', target: '路径分析', type: 'displays', weight: 1, time: '2024-01-01 23:15:00' },
        { source: 'Bloom可视化', target: '社区发现', type: 'visualizes', weight: 1, time: '2024-01-01 23:30:00' }
      ]
    },
    
    'cross_system_integration': {
      data: [
        { source: '性能监控', target: '集群协调器', type: 'informs', weight: 2, time: '2024-01-01 23:45:00' },
        { source: '审计日志', target: '数据备份', type: 'includes_in', weight: 1, time: '2024-01-02 00:00:00' },
        { source: '负载均衡器', target: '性能监控', type: 'monitored_by', weight: 2, time: '2024-01-02 00:15:00' },
        { source: '数据加密', target: '数据备份', type: 'encrypts', weight: 2, time: '2024-01-02 00:30:00' },
        { source: 'APOC插件', target: '数据导入工具', type: 'enhances', weight: 2, time: '2024-01-02 00:45:00' },
        { source: '图算法库', target: '性能监控', type: 'analyzed_by', weight: 1, time: '2024-01-02 01:00:00' },
        { source: '用户认证', target: 'REST API', type: 'secures', weight: 2, time: '2024-01-02 01:15:00' },
        { source: '索引管理器', target: '性能监控', type: 'optimized_by', weight: 2, time: '2024-01-02 01:30:00' }
      ]
    }
  }
}

// 管理图数据库节点类型颜色映射
export const managementNodeTypeColors = {
  database: '#e74c3c',        // 红色 - 数据库核心
  query_engine: '#3498db',    // 蓝色 - 查询引擎
  storage: '#2ecc71',         // 绿色 - 存储引擎
  transaction: '#f39c12',     // 橙色 - 事务管理
  index: '#9b59b6',           // 紫色 - 索引管理
  tool: '#1abc9c',            // 青绿色 - 管理工具
  plugin: '#34495e',          // 深灰色 - 插件扩展
  visualization: '#e67e22',   // 橙红色 - 可视化工具
  monitor: '#f1c40f',         // 黄色 - 监控组件
  security: '#c0392b',        // 深红色 - 安全组件
  backup: '#27ae60',          // 深绿色 - 备份组件
  recovery: '#16a085',        // 深青色 - 恢复组件
  cluster: '#8e44ad',         // 深紫色 - 集群组件
  import_export: '#2980b9',   // 深蓝色 - 导入导出
  driver: '#d35400',          // 深橙色 - 驱动程序
  api: '#7f8c8d',             // 灰色 - API接口
  analytics: '#95a5a6',       // 浅灰色 - 分析工具
  default: '#bdc3c7'          // 默认颜色
}

// 管理图数据库边类型样式映射
export const managementEdgeTypeStyles = {
  contains: { color: '#e74c3c', width: 3 },
  queries: { color: '#3498db', width: 3 },
  uses: { color: '#2ecc71', width: 2 },
  indexes: { color: '#9b59b6', width: 2 },
  manages: { color: '#f39c12', width: 3 },
  executes: { color: '#1abc9c', width: 3 },
  extends: { color: '#34495e', width: 2 },
  analyzes: { color: '#e67e22', width: 3 },
  visualizes: { color: '#e67e22', width: 2 },
  installs: { color: '#95a5a6', width: 1 },
  monitors: { color: '#f1c40f', width: 3 },
  tracks: { color: '#f1c40f', width: 2 },
  measures: { color: '#f1c40f', width: 2 },
  watches: { color: '#f1c40f', width: 2 },
  observes: { color: '#f1c40f', width: 2 },
  includes: { color: '#95a5a6', width: 1 },
  protects: { color: '#c0392b', width: 3 },
  defines: { color: '#c0392b', width: 2 },
  enforces: { color: '#c0392b', width: 2 },
  records: { color: '#c0392b', width: 2 },
  secures: { color: '#c0392b', width: 3 },
  logs: { color: '#c0392b', width: 2 },
  restricts: { color: '#c0392b', width: 1 },
  backs_up: { color: '#27ae60', width: 3 },
  implements: { color: '#27ae60', width: 2 },
  restores_from: { color: '#16a085', width: 3 },
  coordinates: { color: '#8e44ad', width: 2 },
  hosts: { color: '#8e44ad', width: 3 },
  replicates: { color: '#8e44ad', width: 3 },
  distributes_to: { color: '#8e44ad', width: 2 },
  imports_to: { color: '#2980b9', width: 3 },
  exports_from: { color: '#2980b9', width: 3 },
  supports: { color: '#2980b9', width: 2 },
  preprocesses: { color: '#2980b9', width: 2 },
  postprocesses: { color: '#2980b9', width: 2 },
  connects_to: { color: '#d35400', width: 2 },
  exposes: { color: '#7f8c8d', width: 2 },
  wraps: { color: '#7f8c8d', width: 2 },
  routes_to: { color: '#7f8c8d', width: 1 },
  displays: { color: '#95a5a6', width: 1 },
  informs: { color: '#f39c12', width: 2 },
  includes_in: { color: '#95a5a6', width: 1 },
  monitored_by: { color: '#f1c40f', width: 2 },
  encrypts: { color: '#c0392b', width: 2 },
  enhances: { color: '#34495e', width: 2 },
  analyzed_by: { color: '#95a5a6', width: 1 },
  optimized_by: { color: '#f1c40f', width: 2 },
  default: { color: '#bdc3c7', width: 1 }
}





